package cn.lzx.feign;

import cn.lzx.domain.JsonResult;

import cn.lzx.dto.UserMovieDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@Component
@FeignClient(name ="service-movie", fallbackFactory = MovieFeignFallbackFactory.class)
public interface MovieFeign {


    @GetMapping("/movie/findById/{id}")
    JsonResult findById(@PathVariable("id") Long id);


    @GetMapping("/movie/getTicket/{userId}")
    JsonResult getTicket(@PathVariable("userId") Long userId);

    @RequestMapping(value="/movie/buyTicket",method= RequestMethod.POST)
    JsonResult buyTicket(@RequestBody UserMovieDto UserMovieDto);

}
